<template>
  <div :class="direction == 'vertical' ? 'wrap wrap_direction' : 'wrap'">
    <div class="wrap_header">
      <slot name="header"></slot>
    </div>
    <div class="wrap_main">
      <slot></slot>
    </div>
    <div class="wrap_footer">
      <slot name="footer"></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    direction: {
      type: String,
      default: "vertical",
    },
  },
};
</script>

<style lang="scss" scoped>
.wrap {
  display: flex;
  height: 100vh;
  .wrap_header {
    height: 30px;
    text-align: center;
    h3 {
      margin: 0px;
    }
  }
  .wrap_main {
    flex: 1;
  }
  .wrap_footer {
    height: 50px;
  }
}
.wrap_direction {
  flex-direction: column;
}
</style>